package com.hotdog.feign;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

/**
 * 进行日志入库操作
 *
 * @author 郭鲁政
 */
@FeignClient(name = "system", contextId = "logsPayFeignClient")
public interface LogsPayFeignClient {
    /**
     * 调用system服务的loginInfoController进行日志的入库操作
     *
     * @param username          用户名
     * @param resourcesAccessed 访问的资源
     */
    @Async
    @GetMapping("/log/insertLogInfo/{username}/{resourcesAccessed}")
    public void logs(@PathVariable(name = "username") String username, @PathVariable(name = "resourcesAccessed") String resourcesAccessed);
}
